x86/MCA: suppress bank clearing for certain injected events
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2013 14:53:30 +0000 (15:53 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2013 14:53:30 +0000 (15:53 +0100)
commitb0583c0e64cc8bb6229c95c3304fdac2051f79b3
treed2365b86c19d8d1c94587ab255dd0d35f4162b60
parent647597124fe28ee88f3baf499f5afdfed8de341f
x86/MCA: suppress bank clearing for certain injected events

As the bits indicating validity of the ADDR and MISC bank MSRs may be
injected in a way that isn't consistent with what the underlying
hardware implements (while the bank must be valid for injection to
work, the auxiliary MSRs may not be implemented - and hence cause #GP
upon access - if the hardware never sets the corresponding valid bits.

Consequently we need to do the clearing writes only if no value was
interposed for the respective MSR (which also makes sense the other way
around: there's no point in clearing a hardware register when all data
read came from software). Of course this all requires the injection
tool to do things in a consistent way (but that had been a requirement
before already).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Ren Yongjie <yongjie.ren@intel.com>
Acked-by: Liu Jinsong <jinsong.liu@intel.com>
xen/arch/x86/cpu/mcheck/mce.c
xen/arch/x86/cpu/mcheck/mce.h